﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Hangjing.Model;
using Hangjing.SQLServerDAL;
using Hangjing.Common;


/// <summary>
/// 修改骑士上下班状态，并添加记录
/// </summary>
public partial class App_Android_Deliver_deliverstate : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        string state = WebUtility.InputText(Request["state"]);//0表示下班，1表示上班 
        int did = HjNetHelper.GetQueryInt("did", 0);

        DeliverWorkLog dal = new DeliverWorkLog();
        DeliverWorkLogInfo info = new DeliverWorkLogInfo();
        info.deliverid = did;
        info.optime = DateTime.Now;
        info.optype = Convert.ToInt32(state);
        info.reveint = 0;
        info.revevar = "";

        dal.Add(info);

        Response.Write("{\"state\":\"1\",\"msg\":\"操作成功\"}");



        Response.End();
    }
}
